<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>计数器列表</title>
</head>
<body>
<ol>
    <li>小学
        <ol>
            <li>一年级
            <ol>
                <li>班长</li>
                <li>学习委员</li>
            </ol>
            </li>
            <li>二年级</li>
        </ol>
    </li>
    <li>初中
    <ol>
        <li>一年级</li>
        <li>二年级</li>
    </ol>
    </li>
    <li>高中</li>
    <li>大学</li>
</ol>
<style>
    ol{
        list-style-type: none;
        counter-reset: school;
    }
    li::before{
        counter-increment: school;
        content:counters(school,'.')'---------';
    }
</style>
</body>
</html>